<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style >
      *{margin: 0; padding: 0;}
      li{
        list-style: none;
      }
  </style>
</head>
<body>
    <div id="tab">
        <div>汽车内容 汽车大降价</div>
        <div>新闻的内容</div>
        <div>购物内容</div>
        <div>水果内容</div>
    </div>
    <script src="./tab.js"> </script>
    <script>  
        let tab=new Tab({
          id:"tab",
          navlist:["汽车","新闻","购物","水果"],  //导航栏
          wrapStyle:{ //外套的样式 tab切换宽高
            width:"900px",
            height:"500px",
            background:"skyblue"
          },
          navStyle:{ //导航的样式
            height:"80px",
            navBackground:"blue",
            liBack:"red",
            liColor:"white"
          }
        })
    </script>
</body>

</html>